package com.tchy.cloud.entity;

import javax.persistence.*;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * xmweilove
 * 课程评价
 */
@Entity
@Table(name = "a_course_comment", schema = "", catalog = "")
public class ACourseCommentEntity {
    private Long id;//主键,课程订单id course_comment_id

    //    private Long course_order_id;//课程订单id course_order_id
    private ACourseOrderEntity courseOrderEntity;

    //    private Long customerId;//用户id  customer_id
    private ACustomerEntity customerEntity;

    private String content;//评价内容  content
    private String commentTime;//评价时间 comment_time
    private Long commentLevel;// 评价等级 comment_level
    private Long parentId;// 父id


    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "course_comment_id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "customer_id")
    public ACustomerEntity getCustomerEntity() {
        return customerEntity;
    }

    public void setCustomerEntity(ACustomerEntity customerEntity) {
        this.customerEntity = customerEntity;
    }


    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "course_order_id")
    public ACourseOrderEntity getCourseOrderEntity() {
        return courseOrderEntity;
    }

    public void setCourseOrderEntity(ACourseOrderEntity courseOrderEntity) {
        this.courseOrderEntity = courseOrderEntity;
    }

    @Basic
    @Column(name = "content")
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Basic
    @Column(name = "comment_time")
    public String getCommentTime() {
        return commentTime;
    }

    public void setCommentTime(String commentTime) {
        this.commentTime = commentTime;
    }

    @Basic
    @Column(name = "comment_level")
    public Long getCommentLevel() {
        return commentLevel;
    }

    public void setCommentLevel(Long commentLevel) {
        this.commentLevel = commentLevel;
    }

    @Basic
    @Column(name = "parent_id")
    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }
}
